package com.bookyourtrek.action;

import java.util.ArrayList;
import com.bookyourtrek.model.SearchAdventureModel;
import com.bookyourtrek.model.SearchListPojo;
import com.opensymphony.xwork2.ActionSupport;

public class SearchAdventureAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String yourlocation;
	private ArrayList<SearchListPojo> searchlist = new ArrayList<SearchListPojo>();
	

	public ArrayList<SearchListPojo> getSearchlist() {
		return searchlist;
	}

	public void setSearchlist(ArrayList<SearchListPojo> searchlist) {
		this.searchlist = searchlist;
	}

	public String getYourlocation() {
		return yourlocation;
	}

	public void setYourlocation(String yourlocation) {
		this.yourlocation = yourlocation;
	}

	public String getAdventuretype() {
		return adventuretype;
	}

	public void setAdventuretype(String adventuretype) {
		this.adventuretype = adventuretype;
	}

	private String adventuretype;
	
	/**
	 * @return
	 */
	public String searchadventure() {
		SearchAdventureModel sam = new SearchAdventureModel();
		switch(Integer.parseInt(adventuretype)) {
		//for trekking
		case 0:
			searchlist = sam.gettreklist(yourlocation, adventuretype);
			break;
		}
		return SUCCESS;
	}
}
